import request from '@/utils/request'

// 查询挂号列表
export function listRegister(query) {
  return request({
    url: '/clinic/register/list',
    method: 'get',
    params: query
  })
}

//查询患者个人挂号列表
export function listUserRegister(query) {
  return request({
    url: '/clinic/register/listUserRegister',
    method: 'get',
    params: query
  })
}



//查询今日挂号列表
export function listTodayRegister(query) {
  return request({
    url: '/clinic/register/listToday',
    method: 'get',
    params: query
  })
}

//查询历史挂号列表
export function listHistoryRegister(query) {
  return request({
    url: '/clinic/register/listHistory',
    method: 'get',
    params: query
  })
}

//查询待发药患者
export function listdrugpatient(query) {
  return request({
    url: '/clinic/register/listSend',
    method: 'get',
    params: query
  })
}

// 查询挂号详细
export function getRegister(registerId) {
  return request({
    url: '/clinic/register/' + registerId,
    method: 'get'
  })
}

// 新增挂号
export function addRegister(data) {
  return request({
    url: '/clinic/register',
    method: 'post',
    data: data
  })
}

//新增个人挂号
export function addPersonRegister(data) {
  return request({
    url: '/clinic/register/personregister',
    method: 'post',
    data: data
  })
}

// 预约挂号
export function addBookRegister(data) {
  return request({
    url: '/clinic/register/bookregister',
    method: 'post',
    data: data
  })
}

// 修改挂号
export function updateRegister(data) {
  return request({
    url: '/clinic/register',
    method: 'put',
    data: data
  })
}

// 删除挂号
export function delRegister(registerId) {
  return request({
    url: '/clinic/register/' + registerId,
    method: 'delete'
  })
}
